package com.cjm.one.system.controller;

//import com.cjm.one.security.annotation.Within;
import com.cjm.one.common.annotation.IgnoreTenantForAdmin;
import com.cjm.one.system.service.CaptchaSystemService;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.auth.system.vo.CaptchaCodeVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Tag(name = "系统验证码相关接口", description = "验证码接口")
@RequestMapping("/admin/auth/system")
public class CaptchaSystemController {
    @Resource
    private CaptchaSystemService captchaSystemService ;
    /**
     * @description:获取验证码
     * @author: cjm
     * @date: 2024/9/6 17:20
     * @param: []
     * @return: com.alibaba.nacos.api.model.v2.Result<com.one.model.auth.system.vo.CaptchaCodeVo>
     **/
    @GetMapping("/captchaCode")
    @Operation(summary = "获取验证码")
    public Result<CaptchaCodeVo> getCaptchaCode() {
        return Result.ok(captchaSystemService.getCaptchaCode());
    }

}
